/**
 * 运行环境
 * @type {[type]}
 */
const env = () => {
    try {
        const systemInfo = uni.getSystemInfoSync();
        const menuButton = uni.getMenuButtonBoundingClientRect();
        const height = menuButton.height + menuButton.top + 6;
        const right = systemInfo.windowWidth - menuButton.right;
        return Object.assign(systemInfo, {
            NODE_ENV: systemInfo.platform === 'devtools',
            headerInfo: {
                height: height,
                top: menuButton.top,
                bottom: 6,
                right: right,
                paddingRight: right * 2 + menuButton.width,
                menuHeight: menuButton.height,
                menuWidth: menuButton.width
            }
        });
    } catch (err) {
        console.log('CatchClause', err);
        console.log('CatchClause', err);
        console.error(err);
        return {};
    }
};
module.exports = env();
